package com.atguigu.webflux.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.reactive.result.view.Rendering;

/**
 * @author Jungle
 * @create 2024-01-13 16:58
 * 处理跳转请求
 */
@RequestMapping("/jump")
@Controller
public class JumpController {

    @GetMapping("/baidu")
    public Rendering rendering() {
        // Rendering.redirectTo("/aaa");  //重定向到当前项目根路径下的aaa
        return Rendering.redirectTo("http://www.baidu.com").build();
    }
}
